 /*
 * Team Name: Focus
 * Team Members: Diana Groun, Edward Bassan
 * File Name; register.h
 * Description: This file contains the definitions of a register and its member
 */

#ifndef REGISTER_H_
#define REGISTER_H_
#include "global.h"
#define BIT_LOW_MASK 0x00FF
#define BIT_HIGH_MASK 0xFF00



typedef struct Register {
        //Register field.
        unsigned short value;

        //member functions.
        int (*setRegister)(struct Register*, unsigned short);
        int (*setLOB)(struct Register*, Byte);
        unsigned short (*getLOB)(struct Register*);
        int (*displayRegister)(struct Register*);
        unsigned short (*getValue)(struct Register*);
} Register;

typedef Register*RegisterPtr;

//functions.
RegisterPtr newRegister();
int setRegister(Register*, unsigned short value);
int setLOB(Register*, Byte);
unsigned short getLOB(Register*);
int displayRegister(Register*);
unsigned short RegisterGetValue(Register*);

#endif /* REGISTER_H_ */
